package com.scy.boot04test02.mapper;

import com.scy.boot04test02.entity.Books;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BooksMapper {
    @Insert("insert into book value(null,#{name},#{price},#{page},#{author})")
    void insert(Books books);

    @Select("select * from book")
    List<Books> select();

    @Delete("delete from book where id=#{id}")
    void delete(int id);

    @Update("update book set name=#{name},price=#{price},page=#{page},author=#{author} where id=#{id}")
    void update(Books books);
}
